import Vue from 'vue'
import { getInitWebInfo } from '../api/web'
import utils from './utils.js'

Vue.prototype.$webInfo = {}
Vue.prototype.$IntegralAlias = ''
getInitWebInfo().then(res => {
  if (res) {
    utils.changeTitle(res.Data.BusinessName)
    Vue.prototype.$webInfo = res.Data
    Vue.prototype.$IntegralAlias = res.Data.IntegralAlias ? res.Data.IntegralAlias : '积分'
    window.document.documentElement.setAttribute('data-theme', res.Data.StyleSkin)
    console.log(Vue.prototype.$IntegralAlias)
  }
})
